package com.ssy.lingxi.pay.api.dto.request.eAccount;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * e账号退款实体
 * @author jw.chen
 * @version 2.0.0
 * @date 2021/12/9
 */
@Data
public class StoreRefundRequest implements Serializable {
    private static final long serialVersionUID = 6735738498239014704L;

    /**
     * 会员id(付款方)
     */
    @NotNull(message = "付款方会员id要大于0")
    @Positive(message = "付款方会员id要大于0")
    private Long payMemberId;

    /**
     * 会员角色id(付款方)
     */
    @NotNull(message = "付款方角色id要大于0")
    @Positive(message = "付款方角色id要大于0")
    private Long payMemberRoleId;

    /**
     * 原支付订单号(对应支付时的总单号)
     */
    @NotBlank(message = "原支付订单号不能为空")
    @Size(max = 32, message = "原支付订单号最长32个字符")
    private String payCode;

    /**
     * 退款订单号(新生成的退款单号)
     */
    @NotBlank(message = "退款订单号不能为空")
    @Size(max = 32, message = "退款订单号最长32个字符")
    private String orderCode;

    /**
     * 分账退款列表
     */
    @Valid
    @NotNull(message = "分账退款列表不能为空")
    private List<StoreRefundReceiveRequest> storeRefundReceiveList;
}
